﻿using System;
using studentSubsidy.Models;
namespace studentSubsidy.Entity.User
{
    public class LoginResult
    {
        private int code;
        private string token;
        private string message;
        private Models.User user;

        public LoginResult(int code, string token, string message, Models.User user)
        {
            this.code = code;
            this.token = token;
            this.message = message;
            this.user = user;
        }

        public Models.User User
        {
            get => user;
            set => user = value ?? throw new ArgumentNullException(nameof(value));
        }

        public string Token
        {
            get => token;
            set => token = value ?? throw new ArgumentNullException(nameof(value));
        }

        public int Code
        {
            get => code;
            set => code = value;
        }

        public string Message
        {
            get => message;
            set => message = value ?? throw new ArgumentNullException(nameof(value));
        }
    }
}